#define  _CRT_SECURE_NO_WARNINGS 1

int countPoints(char* rings) {
    int arr[10][3] = { 0 };
    int count = 0;
    for (int i = 0; rings[i] != '\0'; i += 2)
    {
        int j = i + 1;
        char get[2];
        get[0] = rings[j];
        get[1] = '\0';
        int tmp = atoi(get);
        if (rings[i] == 'R')
        {
            arr[tmp][0] = 1;
        }
        else if (rings[i] == 'G')
        {
            arr[tmp][1] = 1;
        }
        else
        {
            arr[tmp][2] = 1;
        }
    }
    for (int i = 0; i < 10; i++)
    {
        if (arr[i][0] == 1 && arr[i][1] == 1 && arr[i][2] == 1)
        {
            count++;
        }
    }

    return count;
}